package com.huluobo.a2303mdmdemo.demo

import androidx.compose.foundation.clickable
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.navigation.NavHostController
import com.blankj.utilcode.util.SPUtils
import com.google.gson.Gson
import com.huluobo.lib_base.RoutePath

/**
 *  Created by LC on 2025/8/16.
 */
data class User(val username: String, val password: String, val img: String)

@Composable
fun FirstPage(navHostController: NavHostController) {
    val user = User("lc", "123", "http://www.baidu.com")
    val json = Gson().toJson(user)
    Text(text = "第一页面", modifier = Modifier.clickable {
        SPUtils.getInstance().put("user", json)
        navHostController.navigate(RoutePath.SEC)
    },color= Color.Red)
}